// FrogRegisterDialog.cpp : Implementation of CFrogRegisterDialog

#include "stdafx.h"
#include "FrogRegisterDialog.h"
#include "FrogMessageBox.h"

#pragma warning(disable:4482)

// CFrogRegisterDialog

LRESULT CFrogRegisterDialog::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	CFrogBaseDialog::OnInitDialog(uMsg, wParam, lParam, bHandled);
	m_FrogDotComLink.SubclassWindow(GetDlgItem(IDC_STATIC_FROG_LINK));

	return 0;
}

LRESULT CFrogRegisterDialog::OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	bHandled = TRUE;
	// TODO: Add your control notification handler code here

	HWND hwndUserName = GetDlgItem(IDC_EDIT_USERNAME);
	HWND hwndKey = GetDlgItem(IDC_EDIT_KEY);

	wchar_t userName[1024];
	wchar_t key[1024];

	::GetWindowText(hwndUserName, userName, 1024);
	::GetWindowText(hwndKey, key, 1024);

	wstring userNameStr = userName;
	wstring keyStr = key;

	if (true)
	{
		FrogMessageBox(m_hWnd, L"User Registration was Successful", L"FilerFrog Registation", 0);
		EndDialog(wID);
	}	
	
	return 0;
}